.class final Lcom/ninesky/browser/m;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/widget/CompoundButton$OnCheckedChangeListener;


# instance fields
.field private synthetic a:Lcom/ninesky/browser/AddBookmarkActivity;


# direct methods
.method constructor <init>(Lcom/ninesky/browser/AddBookmarkActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onCheckedChanged(Landroid/widget/CompoundButton;Z)V
    .locals 3

    iget-object v0, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v0}, Lcom/ninesky/browser/AddBookmarkActivity;->c(Lcom/ninesky/browser/AddBookmarkActivity;)Landroid/widget/EditText;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-interface {v0}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1}, Lcom/ninesky/browser/AddBookmarkActivity;->d(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1, v0}, Lcom/ninesky/browser/AddBookmarkActivity;->a(Lcom/ninesky/browser/AddBookmarkActivity;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1}, Lcom/ninesky/browser/AddBookmarkActivity;->d(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;

    move-result-object v1

    const-string v2, ","

    invoke-static {v1, v2}, Lcom/ninesky/a/b;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/ninesky/browser/AddBookmarkActivity;->a(Lcom/ninesky/browser/AddBookmarkActivity;Ljava/util/Vector;)V

    const-string v0, "NSBrowser.AddBookmarkActivity"

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "tag changed by input: "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v2}, Lcom/ninesky/browser/AddBookmarkActivity;->d(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :cond_0
    invoke-virtual {p1}, Landroid/widget/CompoundButton;->getText()Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    if-eqz p2, :cond_2

    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1}, Lcom/ninesky/browser/AddBookmarkActivity;->e(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/util/Vector;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/util/Vector;->contains(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1}, Lcom/ninesky/browser/AddBookmarkActivity;->e(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/util/Vector;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    :cond_1
    :goto_0
    iget-object v0, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1}, Lcom/ninesky/browser/AddBookmarkActivity;->e(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/util/Vector;

    move-result-object v1

    const-string v2, ","

    invoke-static {v1, v2}, Lcom/ninesky/a/b;->a(Ljava/util/Vector;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/ninesky/browser/AddBookmarkActivity;->a(Lcom/ninesky/browser/AddBookmarkActivity;Ljava/lang/String;)V

    const-string v0, "NSBrowser.AddBookmarkActivity"

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "tag changed by checkbox: "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v2}, Lcom/ninesky/browser/AddBookmarkActivity;->d(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v0}, Lcom/ninesky/browser/AddBookmarkActivity;->c(Lcom/ninesky/browser/AddBookmarkActivity;)Landroid/widget/EditText;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1}, Lcom/ninesky/browser/AddBookmarkActivity;->d(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    const-string v1, "AddBookmark"

    const-string v2, "TagCheckedChanged"

    invoke-static {v0, v1, v2}, Lcom/mobclick/android/c;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    return-void

    :cond_2
    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1}, Lcom/ninesky/browser/AddBookmarkActivity;->e(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/util/Vector;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/util/Vector;->contains(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/ninesky/browser/m;->a:Lcom/ninesky/browser/AddBookmarkActivity;

    invoke-static {v1}, Lcom/ninesky/browser/AddBookmarkActivity;->e(Lcom/ninesky/browser/AddBookmarkActivity;)Ljava/util/Vector;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/util/Vector;->remove(Ljava/lang/Object;)Z

    goto :goto_0
.end method
